// VolumeManager.h: interface for the VolumeManager class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_VOLUMEMANAGER_H__CF32AFFF_775C_43F4_9D4B_571579A05A64__INCLUDED_)
#define AFX_VOLUMEMANAGER_H__CF32AFFF_775C_43F4_9D4B_571579A05A64__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "ManagerTemplate.h"
#include "Volume.h"
#include "ProjectSubObject.h"

Volume* Convert(Volume* p, const ObjectId& id);

INLINE BOOL TypeCast(const UeObjectId& i, Volume*& o)
{
	o = Convert(o, i);
	return TRUE;
}

class DllExport VolumeManager :
		public ReferenceManager<UeObjectId, UeObjectId, Volume*> ,
		public ProjectSubObject
{
public:
	VolumeManager();
	virtual ~VolumeManager();

public:
	Volume* CurVolume();
	Volume* GetVolume(INT nKey);
	void SetCurVolume(Volume* pVolume);
	void AddVolume(Volume* pVolume);
	
private:
	Volume* m_pCurVolume;
};

#endif // !defined(AFX_VOLUMEMANAGER_H__CF32AFFF_775C_43F4_9D4B_571579A05A64__INCLUDED_)
